﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
    public class Fruit
    {
        private int id;
        private string name;
        private int price;
        public int Id
        {
            get
            {
                return id;
            }
            set
            {
                id = value;
            }
        }
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }
        public int Price
        {
            get
            {
                return price;
            }
            set
            {
               price = value;
            }
        }
        public void FruitInfo()
        {
            Console.WriteLine("水果编号：{0} 水果名称：{1} 水果价格：{2}",id,name,price);
        }

    }
}
